/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package br.com.projeto.persistence.jpa;

import br.com.projeto.persistence.exception.JPADeleteException;
import br.com.projeto.persistence.exception.JPAInsertException;
import br.com.projeto.persistence.exception.JPAQueryException;
import br.com.projeto.persistence.exception.JPAUpdateException;
import java.util.Calendar;
import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 *
 * @author matheus
 */
public interface DaoGeneric<T> {

	T save(T entidadeGenerica) throws JPAInsertException;

	void delete(Object campo) throws JPADeleteException;

	Object update(Object entidadeGenerica) throws JPAUpdateException;

	void updateTransaction(Object entidadeGenerica1, Object entidadeGenerica2) throws JPAUpdateException;

	T getObjectChave(Class<? extends T> clazz, long chave) throws JPAQueryException;

	List<T> listObject(String campo, String consulta) throws JPAQueryException;

	List<String> listObjects(long campo, String consulta) throws JPAQueryException;

	List<String> listObjects(String campo, String consulta) throws JPAQueryException;

	List<T> listObject(long campo, String consulta) throws JPAQueryException;

	List<T> listObjectAll(String campo1, String campo2, String consulta) throws JPAQueryException;

	List<T> listObjects(String campo1, long campo2, String consulta) throws JPAQueryException;

	T listObjectByEnum(Enum campo, String consulta) throws JPAQueryException;

	List<T> listObjectByEnum(long campo, Enum campo2, String consulta) throws JPAQueryException;

	T object(String campo, String consulta) throws JPAQueryException;

	T object(long campo, String consulta) throws JPAQueryException;

	T object(String campo1, String campo2, String consulta) throws JPAQueryException;

	T object(String campo1, long campo2, String consulta) throws JPAQueryException;

	T object(String campo1, String campo2, String campo3, String consulta) throws JPAQueryException;

	List<T> listObjectByData(Date data, String consulta) throws JPAQueryException;

	List<T> listObjects(String consulta) throws JPAQueryException;

	List<T> listDataBetween(Date dataInicio, Date dataFim, String consulta) throws JPAQueryException;

	List<T> listDataBetweenLimit(Date dataInicio, Date dataFim, String consulta, int totalLinhas) throws JPAQueryException;

	T validarCampos(String campo1, String campo2, String consulta) throws JPAQueryException;

	List<T> getObjectByEntityOfDay(long id, Calendar diaI, Calendar diaF, String consulta);

	Object getObjectsByNativeQuery(String consulta);

	List<T> getListObjectByParameter(Object campo, String consulta);

	List<T> getObjects(String consulta);

	Object getObject(Object campo, String consulta);

	List<T> getObjectsDataAtual(String consulta, Calendar dataAtual);

	List<T> getObjectsByData(String consulta, Calendar dataInicio, Calendar dataFim);

	void removeList(List<T> objList);

	List<T> listObjectsByParameter(Date dataConsulta, int diaPagamento, String consulta);

	List<T> getObjectsWithLimite(String consulta, int limite);

	Object getObject(Object valor1, Object valor2, String consulta);

	Object getObject(String consulta);

	T getTotal(String consulta);

	T getObjectsWithLimite(String consulta);

	T[] getObjectsByDataNative(String consulta, Date dataInicio, Date dataFim);

	T getObjectByDataNative(long campo, String consulta);

	boolean insertDataNative(String consulta);

	List<String> listObjectString(String consulta) throws JPAQueryException;

	Object pesquisaObjetoPorParametro(Map<String, Object> params, String query) throws JPAQueryException;

	T pesquisaPorParametro(Map<String, Object> params, String query) throws JPAQueryException;

	List<T> listarPesquisaPorParametro(Map<String, Object> params, String query) throws JPAQueryException;

	Object listarPesquisaPorParametros(Map<String, Object> params, String query) throws JPAQueryException;

	List<Object[]> getObjectosConsultaNativa(String consulta);

	List<Object> listarObjetosPorParametro(Map<String, Object> params, String query) throws JPAQueryException;
}
